<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
           var hao  = window.prompt("请你输入汽油号数");
           var dum =  window.prompt("请你输入要加多少升");
           if(hao==92&&dum<20)
           {
               dum = parseInt(dum);
               var sum  = dum*6;
              alert(sum);
           }
           if(hao==92&&dum>=20)
           {
            dum = parseInt(dum);
               var sum  = dum*5.9;
              alert(sum);
           }

           if(hao==97&&dum<40)
           {
            dum = parseInt(dum);
               var sum  = dum*7;
              alert(sum);
           }
           if(hao==97&&dum>=40)
           {
            dum = parseInt(dum);
               var sum  = dum*6.5;
              alert(sum);
           }
    </script>
</body>
</html>